function B = beautyfyMap_CoRu(BGobj, collections, rule_objects, project_id)

%takes the collections and rules and highlights the nodes that represent
%them. In rules only the object node is highlighted
%
%Romesh Stanislaus May 2009

numOfNodes = size(BGobj.Nodes,1);
%find(strcmp(BGobj.Nodes(5).ID, collections))
BGobj.ArrowSize = 4;
%make all collections nodes green
for i = 1:size(collections,1)
    for k = 1:numOfNodes
        if strcmp(BGobj.Nodes(k).ID,collections{i})
            %found a node containing a collection
            BGobj.Nodes(k).Color = [0.7 1.0 0.7];
            BGobj.Nodes(k).Shape = 'ellipse';
            BGobj.Nodes(k).Size = [5 5];
        end
        try
            if strcmp(BGobj.Nodes(k).ID, num2str(project_id))
                %found the project id
                BGobj.Nodes(k).Color = [0.9 0.14 0.16];
                BGobj.Nodes(k).Shape = 'circle';
            end
        catch
            %ignore since project id not sent as doubele
            disp('Ignoring project id config...')
        end
    end
end

% %make all rule object nodes red
% for f = 1:size(rule_objects,1)
%     for k = 1:numOfNodes
%         if strcmp(BGobj.Nodes(k).ID,rule_objects{f})
%             %found rule object node
%             BGobj.Nodes(k).Color = [1.0 0.7 0.7];
%             BGobj.Nodes(k).Shape = 'box';
%             %BGobj.Nodes(k).UserData ='user data here';
%         end
%     end
% end


B = BGobj;